#include <iostream>
using namespace std;
class Point
{
public:
    int x;
    int y;
    Point(int x, int y) : x{x}, y{y}
    {
    }
    friend class Dot;
};
class Dot
{
public:
    int x;
    int y;
    Dot(int x, int y) : x{x}, y{y}
    {
    }
    void doSomethingwithFirend(Point p)
    {
        cout << p.x << endl;
    }
};
int main()
{
    Point p1{1, 3};
    Dot d1{1, 3};
    d1.doSomethingwithFirend(p1);
    return 0;
}